home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_basi / n_b-v200.zip / NB02 / DMO / LPT-TEST.DMO < prev    next >
Text File  |  1996-03-11  |  2KB  |  43 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   LPT-TEST.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB02.INC"
  22. COLOR 7, 0
  23. CLS
  24.  
  25. ? "┌────────────────────────────────────────────────────────────────
  26. ? "│ fLPTready% ( LPTno? )
  27. ? "├───────────────────────────────────────────────────────────────────
  28. ? "│ Testing for the printer is just a bit trickier than it could be
  29. ? "│ because the printer/DOS is slow in reporting things and there are
  30. ? "│ plenty of times you can get a "YES" when there is no printer there!
  31. ? "│ This function tests many, many times until it returns it's answer and
  32. ? "│ is, therefore, pretty accurate.
  33. ? "└────────────────────────────────────────────────────────────────────────
  34. ?
  35.  
  36. LPTno? = 1                     ' usually this is it but 2 & 3 exist too
  37. LPTok% = fLPTready%( LPTno? )
  38.  
  39. IF ( LPTok% = -1           ) THEN PRINT "The printer is ready to go!"
  40. IF ( LPTok% AND &b00000001 ) THEN PRINT "LPT TIMEOUT"
  41. IF ( LPTok% AND &b00001000 ) THEN PRINT "I/O ERROR REPORTED / NO PRINTER"
  42. IF ( LPTok% AND &b00100000 ) THEN PRINT "OUT OF PAPER - FEED ME!"
  43.